﻿#include<stdio.h>
#include "lib.h"

//input
ListProcess Input()
{	
	ListProcess lp;
	Process p;		
	int i;
	FILE *f;
	// mo file
	f = fopen("CPU.txt","rt");
	//lay so process
	fscanf(f,"%d",&lp.N);	
	//lay cac thong so cua process
	for(i=0;i<lp.N;i++)
	{			
		fscanf(f,"%d",&p.Pn);
		fscanf(f,"%d",&p.Est);
		fscanf(f,"%d",&p.Eqt);
		fscanf(f,"%d",&p.St);
		lp.A[i]=p;
	}
	//lay q
	fscanf(f,"%d",&lp.Q);		
	fclose(f);
	ListProcess lp1 = lp;
	return lp1; 
}
